package org.jeecg.modules.charge.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.netflix.discovery.converters.Auto;
import org.jeecg.entity.charge.ChargeFeeRule;
import org.jeecg.modules.charge.mapper.ChargeFeeRuleMapper;
import org.jeecg.modules.charge.service.IChargeFeeRuleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 收费规则
 * @Author: jeecg-boot
 * @Date:   2021-06-24
 * @Version: V1.0
 */
@Service
public class ChargeFeeRuleServiceImpl extends ServiceImpl<ChargeFeeRuleMapper, ChargeFeeRule> implements IChargeFeeRuleService {
    @Autowired
    private ChargeFeeRuleMapper chargeFeeRuleMapper;
    @Override
    public List<ChargeFeeRule> findPage(Page<ChargeFeeRule> page, ChargeFeeRule chargeFeeRule) {
        return chargeFeeRuleMapper.findPage(page,chargeFeeRule);
    }

    @Override
    public Integer getFeeRoomRule(String id) {
        return chargeFeeRuleMapper.getFeeRoomRule(id);
    }

    @Override
    public List<ChargeFeeRule> getByFeeId(String feeId){
        return chargeFeeRuleMapper.getByFeeId(feeId);
    }

    @Override
    public List<ChargeFeeRule> queryByProjectId(String projectId) {
        return chargeFeeRuleMapper.queryByProjectId(projectId);
    }

    @Override
    public ChargeFeeRule getByFeeIdAndRoomId(String feeId, String roomId) {
        return chargeFeeRuleMapper.getByFeeIdAndRoomId(feeId,roomId);
    }
}
